<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * CodeIgniter MY_Controller Class
 *
 *
 * @package		CodeIgniter
 * @subpackage	Libraries
 * @category	Libraries
 * @author		ONIPHP CO.,LTD
 * @link		http://www.oniphp.com
 */
/**
 * CodeIgniter MY_Administrator Class
 *
 *
 * @package		CodeIgniter
 * @subpackage	Libraries
 * @category	Libraries
 * @author		ONIPHP CO.,LTD
 * @link		http://www.oniphp.com
 */
class MY_Administrator extends CI_Controller {
   	public function __construct()
   	{
        parent::__construct();
		//Load model
		$this->load->model('administrator_model');
		        
        /*Set Static Values*/
        $this->data['admin_root'] = $this->config->item('admin_root');
        $this->data['admin_path'] = $this->config->item('admin_path');
        $this->data['admin_company'] = $this->config->item('admin_company');
		$this->data['css'] = array("dashicons.min.css","wp-admin.min.css","buttons.min.css","colors.min.css");
		$this->data['js'] = array();

		//Set Cookies Value
		if($this->session->userdata('adminData')):
			/*Load Css*/
			$this->data['css'][] = "admin-bar.min.css";
			$this->data['css'][] = "wp-auth-check.min.css";
			/*Load Js*/
			$this->data['js'][] = "jquery.js";
			$this->data['js'][] = "jquery-migrate.min.js";
			$this->data['js'][] = "hoverIntent.min.js";			
			$this->data['js'][] = "common.min.js";			
			$this->data['js'][] = "admin-bar.min.js";		
			$this->data['js'][] = "utils.min.js";			
			$this->data['js'][] = "default.js";			
			/*Set Cookie*/	
			$this->data['mfold'] =  substr(get_cookie('wp-settings-'.$this->session->userdata('adminData')['user_id']),-1);
			$this->data['mfold_time'] = get_cookie('wp-settings-time-'.$this->session->userdata('adminData')['user_id']);
			/*Generate Menu*/
			$this->data['dataGenerateMenu'] = $this->administrator_model->generate_menu();
		endif;
				
		/*Check Login */
		$this->administrator_model->check_login();
   	}
}
// END MY_Administrator class

/* End of file Fb.php */
/* Location: ./application/libraries/Fb.php */
